checks in entry.S. This will avoid a hard-to-debug loop
that we found ourselves in recently, involving
hypercall_preempt_check() spuriously returning TRUE, but
no event getting propagated to the guest (since mask != 0).
Signed-off-by: Keir Fraser <keir@xensource.com>
/* Note: Bitwise operations result in fast code with no branches. */
#define event_pending(v) \
- ((v)->vcpu_info->evtchn_upcall_pending & \
- ~(v)->vcpu_info->evtchn_upcall_mask)
+ (!!(v)->vcpu_info->evtchn_upcall_pending & \
+ !(v)->vcpu_info->evtchn_upcall_mask)
#endif /* __XEN_EVENT_H__ */